﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for GooglePoint
/// </summary>
public class GooglePoint
{
    public GooglePoint()
    {

    }
    public GooglePoint(double lat, double lon)
    {
        _lat = lat;
        _lon = lon;
    }
    public GooglePoint Clone()
    {
        GooglePoint point = new GooglePoint();
        point.Latitude = this.Latitude;
        point.Longitude = this.Longitude;
        return point;
    }

    double _lat = 0.0;
    public double Latitude
    {
        get
        {
            return _lat;
        }
        set
        {
            _lat = value;
        }
    }

    double _lon = 0.0;
    public double Longitude
    {
        get
        {
            return _lon;
        }
        set
        {
            _lon = value;
        }
    }


    public override bool Equals(System.Object obj)
    {
        // If parameter is null return false.
        if (obj == null)
        {
            return false;
        }

        // If parameter cannot be cast to Point return false.
        GooglePoint p = obj as GooglePoint;
        if ((System.Object)p == null)
        {
            return false;
        }

        // Return true if the fields match:
        return (Latitude == p.Latitude) && (Longitude == p.Longitude);
    }
}